From Cppreference
|
|
| struct defer_lock_t { };
|
|
(since C++11)
|
|
|
|
| struct try_to_lock_t { };
|
|
(since C++11)
|
|
|
|
| struct adopt_lock_t { };
|
|
(since C++11)
|
|
|
|
std::defer_lock_t, std::try_to_lock_t and std::adopt_lock_t are empty struct tag types used to specify locking strategy.
|
|
| Type
|
Effect(s)
|
|
|
| defer_lock_t
|
do not acquire ownership of the mutex
|
|
|
| try_to_t
|
try to acquire ownership of the mutex without blocking
|
|
|
| adopt_lock_t
|
assume the calling thread already has ownership of the mutex
|
[edit] Example
[edit] See also
|
|
|
|
tag constants used to specify locking strategy (constant)
|